<HTML><HEAD><TITLE>all_disjoint(+SetVars)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(cardinal)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>all_disjoint(+SetVars)</H1>
All sets disjointness global constraint
<DL>
<DT><EM>SetVars</EM></DT>
<DD>A list of set variables.
</DD>
</DL>
<H2>Description</H2>
Constrain all pairs of sets in SetVars to be disjoint. I.e. No two sets
		can have a common element (empty pairwise intersection).<P>
		This version of all_disjoint/1 is a weak global constraint, but stronger
		than the simple posting of all pairwise disjoint/2 constraints, since
		it posts the additional constraint that the sum of the cardinalities of
		SetVars must be less than or equal to the cardinality of the union of all
		the initial LUBs.
<H3>Fail Conditions</H3>
Fails if SetVars can not be all disjoint.
<H3>Resatisfiable</H3>
No.
<H2>Examples</H2>
<PRE>
?- all_disjoint([[7],[8],[i,k]]).
yes

?- all_disjoint([[7,8],[i],[8]]).
no

?- sets([X,Y,Z], [],[1,2,7,8,9], [cardinality:2]), all_disjoint([X,Y,Z]).
no

?- sets([X,Y,Z], [],[1,2,7,8,9], [cardinality:2]), all_disjoint([X,Y,Z]), 2 `@ X, lub(Y,LubY), lub(Z,LubZ)
LubY = [1,7,8,9], LubZ = [1,7,8,9]
</PRE>
<H2>See Also</H2>
<A HREF="../../lib_public/cardinal/BS-2.html">`$ / 2</A>, <A HREF="../../lib_public/cardinal/BLG-2.html">`<> / 2</A>, <A HREF="../../lib_public/cardinal/complement-2.html">complement / 2</A>, <A HREF="../../lib_public/cardinal/complement-3.html">complement / 3</A>, <A HREF="../../lib_public/cardinal/BFE-2.html">`/= / 2</A>, <A HREF="../../lib_public/cardinal/all_union-2.html">all_union / 2</A>
</BODY></HTML>
